package com.ktwlsoft.archivemanage.payload.archiveUnit;

import com.ktwlsoft.archivemanage.payload.inforConst.InforConstUpdateRequest;
import com.ktwlsoft.archivemanage.payload.inforConst.InfrastructureUpdateRequest;
import com.ktwlsoft.archivemanage.payload.unitMember.UnitMemberUpdateRequest;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.util.List;

@ApiModel("立档单位管理更新")
@Setter
@Getter
public class ArchiveUnitManageUpdateRequest {

    /**业务编号(对应立档单位编号)**/
    @ApiModelProperty("业务编号")
    @NotNull(message = "业务编号不能为空")
    @Pattern(regexp = "^\\d{18}$")
    private String businessId;

    @ApiModelProperty("立档单位编号")
    @NotNull(message = "立档单位id不能为空")
    private Long unitId;

//    /**文件列表(key为业务类型,value为文件列表)**/
//    @ApiModelProperty("文件列表")
//    private Map<String,List<MultipartFile>> files;
    /**要删除的文件列表**/
    @ApiModelProperty("要删除的文件列表")
    private List<UploadFileInfo> deleteFiles;

    /**文件列表**/
    @ApiModelProperty("文件列表")
    private List<UploadFileInfo> files;

    /**立档单位信息**/
    @ApiModelProperty("立档单位信息")
    @NotNull(message = "立档单位信息不能为空")
    @Valid
    private ArchiveUnitUpdateRequest archiveUnitUpdateRequest;

    /**人员信息**/
    @ApiModelProperty("人员信息")
    @NotNull(message = "人员信息不能为空")
    @Valid
    private UnitMemberUpdateRequest unitMemberUpdateRequest;

    /**信息化建设**/
    @ApiModelProperty("信息化建设")
    @NotNull(message = "信息化建设不能为空")
    @Valid
    private InforConstUpdateRequest inforConstUpdateRequest;

    /**基础设施信息**/
    @ApiModelProperty("基础设施信息")
    @NotNull(message = "基础设施信息不能为空")
    @Valid
    private InfrastructureUpdateRequest infrastructureUpdateRequest;

    @ApiModelProperty("立档单位旧值序列化字符串")
    private String oldValue;

    @ApiModelProperty("立档单位新值序列化字符串")
    private String newValue;
}
